import request from '@/utils/request'

export default {
  getMerchantListPage(current, limit, merchant) {
    return request({
      url: `/merchant/pageMerchantCondition/${current}/${limit}`,
      method: 'post',
      data: merchant
    })
  },
  // 删除供应商
  removeDataById(id) {
    return request({
      url: `/merchant/delete/${id}`,
      method: 'delete',
    })
  },
  // 添加供应商
  addMerchant(merchant) {
    return request({
      url: `/merchant/save`,
      method: 'post',
      data: merchant
    })
  },
  // 根据id查询供应商
  getMerchantById(id) {
    return request({
      url: `/merchant/getMerchantById/${id}`,
      method: 'get',
    })
  },
  // 修改供应商
  updateMerchantInfo(merchant) {
    return request({
      url: `/merchant/update`,
      method: 'put',
      data: merchant
    })
  },
  // 查询所有供应商
  getMerchantAll() {
    return request({
      url: `/merchant/findAll`,
      method: 'get',
    })
  },
  // 查询所有比赛名称
  getGameNameAll() {
    return request({
      url: `/sjservice/gamename/getAll`,
      method: 'get',
    })
  },
}


